package a;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: jzw
 * @Description
 * @date: 2022/11/23 16:02
 */
public class Me {
    public static void main(String[] args) {
        /*String start = "20221103121451";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        String format = simpleDateFormat.format(start);
        System.out.println(format);
        System.out.println(LocalDate.now());*/
        /*Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        removeDuplicatedChars(x);*/
        List<VoiceVo> list = new ArrayList<>();
        list.add(new VoiceVo("a", "第一个"));
        list.add(new VoiceVo("b", "第2个"));
        list.add(new VoiceVo("c", "第3个"));
        list.stream().forEach(voiceVo -> {
            voiceVo.setDesc("设置后");
        });
        list.stream().forEach(voiceVo -> System.out.println(voiceVo.getCode()+"\t"+voiceVo.getDesc()));
    }

    private static void removeDuplicatedChars(String x) {
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < x.length(); i++) {
            char ch = x.charAt(i);
            int i1 = x.indexOf(ch);
            int i2 = x.lastIndexOf(ch);
            if (i1 != i2) {
                boolean contains = s.toString().contains("" + ch + "");
                if (!contains) {
                    s.append(ch);
                }
            } else
                s.append(ch);
        }
        System.out.println(s);
    }
}
